<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_mortgage_basic`.
 */
class m171027_064253_create_project_mortgage_basic_table extends Migration
{
    /**
     * @inheritdoc
     * （抵押类项目预评估)抵押基本信息
     */
    public function up()
    {
        //
        $this->createTable('project_pre_evaluation_mortgage', [
            'id' => $this->primaryKey(),
            //基本信息
            'project_id' => $this->bigInteger()->notNull(),
            'mortgagor' => $this->string()->notNull()->comment('抵押人'),
            'mortgage_principal' => $this->string()->notNull()->comment('抵押本金（万元）'),
            'mortgage_interest' => $this->string()->notNull()->comment('抵押利息（万元）'),
            'guarantor' => $this->string()->notNull()->comment('保证人'),
            'created_at' => $this->timestamp(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_mortgage_basic');
    }
}
